package studySpring.zhiGan.service;

import studySpring.spring.*;

@Component
@Scope("singleton")
public class UserService implements InitializingBean , BeanNameAware {

    @Autowired
    private OrderInterface orderService;

    private String beanName;

    public void test(){

    }

    @PostConstruct
    public void init(){
        System.out.println("执行postConstruct方法");
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("实现了InitializingBean接口");
    }

    @Override
    public void setBeanName(String name) {
        beanName = name;
    }
}
